/*
 * @Author: YYJ
 * @Date: 2023-12-16 14:40:39
 * @Description: 
 * @FilePath: \lgd-admin\src\services\person\salary\index.tsx
 */
import { request } from '@umijs/max';

export interface PersonSalaryParams {
  salaryMonth?: string;
  startDate?: Date;
  endDate?: Date;
  current?: number;
  pageSize?: number;
}

export interface PersonSalaryItem {
  id?: number;
  salaryDate?: Date;
  optType: 'add';
}

/** 查询工资列表 POST /admin/personSalary/queryList */
export async function queryList(body: PersonSalaryParams) {
  return request<API.LgdTable>('/admin/personSalary/queryList', {
    method: 'POST',
    data: body
  });
}

/** 查询工资列表 POST /admin/personSalary/add */
export async function add(body: PersonSalaryItem) {
  return request<API.LgdResult>('/admin/personSalary/add', {
    method: 'POST',
    data: body
  });
}

export async function remove(id?: number) {
  return request('/admin/personSalary/remove?id=' + id, {
    method: 'POST',
  });
}